using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;

namespace Janus.NorthwindDemo2007
{
	public partial class EmployeeDataForm
	{

		protected override void StartEdition()
		{
			this.EmployeeDataControl1.DataSource = this.DataSet;
			if (this.EditMode == DataFormEditMode.AddNew)
			{
				this.Text = "Employees - New Employee";
				this.EmployeeDataControl1.IsAddNew = true;
			}
			else
			{
				DataRowView dataRow = (DataRowView)CurrencyManager.Current;
				string empName = dataRow["LastName"] + ", " + dataRow["FirstName"];
				this.Text = "Employees - " + empName;
				this.EmployeeDataControl1.IsAddNew = false;
			}
			this.EmployeeDataControl1.Select();
		}

        



	}

} //end of root namespace